//
//  LibHDXHeader.h
//  libHDX
//
//  Created by H.DX on 16/2/25.
//  Copyright © 2016年 H.DX. All rights reserved.
//

#ifndef LibHDXHeader_h
#define LibHDXHeader_h

#import "UtilCheck.h"
#import "UIViewExtByHDX.h"
 

//自定义控件
#import "RZCustomImageView.h"
#import "RZCustomLable.h"
#import "RZCustomButtom.h"
#import "RZCustomTextField.h"
#import "CustomLabel.h"
#import "HDXTextView.h"
#import "GiFHUD.h"//提示器




#import "CustomNavigationController.h"//自定义导航
#import "JCAlertView.h"//弹窗

#import "MudViewController.h"//根视图

#import "NoneDateView.h"
#import "BaseCellController.h"
#import "UIImageView+WebCache.h"
 


#define CLEAR_TIME (1.50f)//UIAlertview  提示消失时间

#define  NAVCOLOR [self hexStringToColor:@"787878"  alpha:0.75]//导航颜色
//主视图委托
#define APPDELEGATE     ( [[UIApplication sharedApplication] delegate])

/**
 * 宽
 */
#define BOUNDSWIDTH [UIScreen mainScreen].bounds.size.width
/**
 * 高
 */
#define BOUNDSHEIGHT [UIScreen mainScreen].bounds.size.height


#define IOS7 [[[UIDevice currentDevice]systemVersion] floatValue] >= 7.0

#define IOS8 [[[UIDevice currentDevice]systemVersion] floatValue] >= 8.0

#define IOS9 [[[UIDevice currentDevice]systemVersion] floatValue] >= 9.0

#define IOS_9_OR_LATER (((SYSTEMVERSION) >= 9.0) ? YES:NO)


#define IOS_8_OR_LATER (((SYSTEMVERSION) >= 8.0) ? YES:NO)

#define IOS_7_OR_LATER (((SYSTEMVERSION) >= 7.0) ? YES:NO)


#define iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)

#define iPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)

#define isIPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)



/**
 *统一导航字体
 */
#define NavFontSize [UIFont systemFontOfSize:18]

/**
 *自定义 国际化+本地化
 */
#define  NSPublicLocalizedString(key, comment)\
NSLocalizedStringFromTable(key,@"PublicString",comment)



/*背景颜色*/
#define  myBackColor @"777777"

/*线条颜色*/
#define LineColor @"ebecf0"

#define DefaultColor @"E98806"
/*默认文字颜色*/
#define  DefaultTextColor @"777777"

#define IMAGE_TIME (60)//更新用户图片时间

/**
 *获取bundle资源束中得文件 filepath地址
 */
#define FILEIMAGENAEM(filepath) [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:[NSString stringWithFormat:@"libHDXImages.bundle/%@.png",filepath]]]



#ifdef iPhone6Plus
#define IMAGEDEFAULT [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:[NSString stringWithFormat:@"libHDXImages.bundle/default/defurl750.png"]]]

#else
#define IMAGEDEFAULT [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:[NSString stringWithFormat:@"libHDXImages.bundle/default/defurl640.png"]]]

#endif


#define IMAGEUSERDEFAULT [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:[NSString stringWithFormat:@"libHDXImages.bundle/default/member_pic.png"]]]

/**
 * 沙盒地址 app图像 可以有子目录
 */
#define AppImage(subfiles) [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat:@"libHDXAppImage%@",subfiles]]

/**
 * 沙盒地址 用户头像 可以有子目录
 */
#define UserImage [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"libHDXUserImage"]


//MicrosoftYaHei 微软雅黑
/**
 *自定义字体
 */
#define CustomFont(fontsize)  [UIFont systemFontOfSize:fontsize]

/**
 *自定义粗字体
 */
#define CustomFontBold(fontsize)  [UIFont boldSystemFontOfSize:fontsize]

/**
 * 控制测试服务器或者 正式服务器 YES： 测试服务器 NO： 正式服务器
 */
//测试服务
//#define  IsTest (YES)
//正式服务
#define  IsTest (NO)

//       "http://13.13.13.157:9009/SpmWeb/"
//       "http://118.249.86.65:57701/SpmWeb/"
//       "http://carechina.nokiasiemensnetworks.com/SpmWeb/"
//        http://13.13.13.157:7001/SpmWeb/  汤
//        http://192.168.1.163:8080/SpmWeb/ http://192.168.1.165/SpmWeb/蔡

//  http://carechina.nokiasiemensnetworks.com/SpmWeb/


//测试服务器 http://13.13.13.157:7001/SpmWeb/
#define APPSTOREACCOUNT @"chendaming"

#define KEY_APPSTORE_URL  @"https://itunes.apple.com/cn/app/%E5%A6%82%E6%84%8F-for-nokia/id1160548595?mt=8"  //商店地址

//#ifdef DEBUG
//#define HOST @"http://13.13.13.25:8080/SpmWeb/"//http://210.22.149.102:8080/SpmWeb/
//#else
//#define HOST @"http://13.13.13.25:8080/SpmWeb/"
//#endif
//http://13.13.13.100:8080/SpmWeb/
//http://13.13.13.32:8080/nokia_bjms/
#ifdef DEBUG
#define HOST @"http://13.13.13.134:8888/SpmWeb/"//http://210.22.149.102:8080/SpmWeb/
#else
#define HOST @"http://ruyi.huanuo-nsb.com:11111/SpmWeb/"
#endif

#define  ImageThumb  iPhone6Plus==YES?@"Thumb750":@"Thumb640"
#define  NODATAIMAGE  FILEIMAGENAEM(@"default/noneData")
#endif /* LibHDXHeader_h */
 


